/* user-passport/1.0.0 login.status.js md5:5c9c278694e6f02f011de43f09032767 */
define("/includes/libraries/javascript/login/login.status.js",
		["/includes/libraries/javascript/login/login.pubSub.js"],
function(require) {
    var c = '<div class="msg-warn"><b></b>{info}</div>';
    var d = '<div class="msg-error"><b></b>{info}</div>';
    var e = require("/includes/libraries/javascript/login/login.pubSub.js");
    var f = {
        onEvent: function(a) {
            var b = {
                ele: "",
                addClass: "",
                removeClass: "",
                callback: function() {}
            };
            a = $.extend(b, a),
            a.addClass && a.ele.addClass(a.addClass),
            a.removeClass && a.ele.removeClass(a.removeClass),
            a.callback()
        },
        onError: function(a, b) {
            var c = d.replace(/{info}/g, a);
            $(".msg-wrap .msg-warn").hide(),
            $(".msg-wrap .msg-error").replaceWith(c),
            $.each(b,
            function() {
                $(this).parent().addClass("item-error")
            })
        },
        onWarn: function() {
            var a = c.replace(/{info}/g, name);
            $(".msg-wrap .msg-error").hide(),
            $(".msg-wrap .msg-warn").replaceWith(a),
            ele.parent().addClass("item-warn")
        },
        onSuccess: function() {},
        onClear: function(a) {
            $(".form .item").delegate(".clear-btn", "click",
            function() {
                var b = $(this).siblings("input[placeholder]");
                $(this).hide(),
                b.val(""),
                setTimeout(function() {
                    b.focus(),
                    b.parent().get(0) == $(".item-fore1 .clear-btn").get(0) && e.publish("username.focus")
                },
                500),
                a && a(),
                $(this).siblings("txt").show()
            })
        }
    };
    return f
});